From 163eacfa9d78bdebec83337031a56acc57dea168 Mon Sep 17 00:00:00 2001 From: justbur Date: Mon, 6 Jul 2015 11:18:55 -0400 Subject: [PATCH] Allow echo-keystrokes but make it quick --- .gitignore | 3 ++- which-key.el | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3853c61a77d..34da34edea6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +*~ # Used to setup library paths for emacs -Q -private-test-setup.el \ No newline at end of file +private-test-setup.el diff --git a/which-key.el b/which-key.el index 37a6e234496..7c7e16753ba 100644 --- a/which-key.el +++ b/which-key.el @@ -80,8 +80,11 @@ Used when `which-key-popup-type' is frame.") (if which-key-mode (progn (unless which-key--setup-p (which-key/setup)) - ;; turn off echo-keytrokes for minibuffer (it can interfer) - (when (eq which-key-popup-type 'minibuffer) (setq echo-keystrokes 0)) + ;; make echo-keytrokes fast for minibuffer popup + ;; (it can interfer if it's too slow) + (when (and (> echo-keystrokes 0) + (eq which-key-popup-type 'minibuffer)) + (setq echo-keystrokes 0.1)) (add-hook 'focus-out-hook 'which-key/stop-open-timer) (add-hook 'focus-in-hook 'which-key/start-open-timer) (which-key/start-open-timer)) @@ -344,7 +347,7 @@ of the intended popup." (n-pages (if max-keys/page (ceiling (/ (float n-keys) max-keys/page)) 1)) pages act-height) - (when (> n-columns 0) + (when (and (> n-keys 0) (> n-columns 0)) (dotimes (p n-pages) (setq pages (push (which-key/create-page max-height n-columns -- 2.30.2